(window.webpackJsonp = window.webpackJsonp || []).push([[17], {
    1634: function (e, n, t) {
        e.exports = t.p + "media/phrase-suggestion/subphrase-3a613ecb.svg"
    },
    1678: function (e, n, t) {
        "use strict";
        t.r(n);
        var r = t(0)
            , o = t.n(r)
            , a = t(3)
            , i = t.n(a)
            , l = t(1441)
            , c = t(1616)
            , s = t.n(c)
            , u = t(565)
            , d = function (e) {
                var n = e.contentState.getEntity(e.entityKey).getData().url;
                return o.a.createElement(u.e, {
                    href: n,
                    title: n
                }, e.children)
            };
        d.propTypes = {
            children: i.a.any,
            contentState: i.a.any,
            entityKey: i.a.any
        };
        var p, h, f, g, b, m, y = {
            strategy: function (e, n, t) {
                e.findEntityRanges((function (e) {
                    var n = e.getEntity();
                    return null !== n && "LINK" === t.getEntity(n).getType()
                }
                ), n)
            },
            component: d
        }, v = t(77), k = t.n(v), w = t(10), E = function (e, n, t, r, o) {
            var a = e.getSelection().merge({
                anchorKey: o,
                anchorOffset: t,
                focusOffset: r,
                focusKey: o
            })
                , i = l.Modifier.replaceText(e.getCurrentContent(), a, n);
            return l.EditorState.push(e, i, "insert-spellcheck-suggestion")
        }, S = t(4), C = t.n(S), x = t(1), O = t.n(x), j = t(2);
        function I (e, n) {
            return n || (n = e.slice(0)),
                e.raw = n,
                e
        }
        var T = O.a.div(p || (p = I(["\n  display: ", ";\n  position: absolute;\n  top: 100%;\n  left: -12px;\n  background-color: ", ";\n  border-radius: 3px;\n  box-shadow: 0px 0px 1px rgba(23, 68, 130, 0.2), 0px 2px 14px rgba(23, 68, 130, 0.15);\n  min-width: 192px;\n  padding: 7px 0px;\n  user-select: none;\n  z-index: 2;\n"])), (function (e) {
            return e.isOpen ? "block" : "none"
        }
        ), j.a.White)
            , P = O.a.div(h || (h = I(["\n  padding: 5px 12px;\n  display: flex;\n  flex-flow: row nowrap;\n  cursor: pointer;\n\n  &:hover {\n    background-color: ", ";\n    color: ", ";\n  }\n"])), j.a.Green300, j.a.White)
            , D = O.a.div(f || (f = I(["\n  padding: 5px 12px;\n  color: ", ";\n"])), j.a.Gray400)
            , L = O.a.div(g || (g = I(["\n  height: 1px;\n  background-color: ", ";\n  margin: 5px 12px;\n"])), j.a.Gray150)
            , A = O.a.div(b || (b = I(["\n  padding: 5px 12px;\n  display: flex;\n  flex-flow: row nowrap;\n  cursor: pointer;\n\n  &:hover {\n    background-color: ", ";\n  }\n"])), j.a.Gray100)
            , B = O.a.div(m || (m = I(["\n  display: inline-block;\n  margin-right: 8px;\n\n  ", " & {\n    color: ", ";\n  }\n\n  ", " & {\n    color: ", ";\n  }\n\n  ", ":hover & {\n    color: ", ";\n  }\n"])), P, j.a.Green300, A, j.a.Gray300, P, j.a.White);
        function _ (e, n) {
            return (_ = Object.setPrototypeOf || function (e, n) {
                return e.__proto__ = n,
                    e
            }
            )(e, n)
        }
        var R = function (e) {
            var n, t;
            function r (n) {
                var t;
                return (t = e.call(this, n) || this).state = {
                    isOpen: !1,
                    top: 0,
                    left: 0,
                    wordId: null
                },
                    t.handleShowDropdown = function (e) {
                        var n = e.wordId
                            , r = e.word
                            , o = e.position
                            , a = e.wordStartIndex
                            , i = e.wordEndIndex
                            , l = e.blockKey;
                        t.setState({
                            isOpen: !0,
                            top: o.top,
                            left: o.left,
                            blockKey: l,
                            wordId: n,
                            word: r,
                            wordStartIndex: a,
                            wordEndIndex: i
                        })
                    }
                    ,
                    t.handleHideDropdown = function () {
                        t.setState({
                            isOpen: !1,
                            wordId: null
                        })
                    }
                    ,
                    t.handleMouseOver = function () {
                        var e = t.props.spellCheckEmitter
                            , n = t.state
                            , r = n.top
                            , o = n.left
                            , a = n.wordId
                            , i = n.word
                            , l = n.wordStartIndex
                            , c = n.wordEndIndex
                            , s = {
                                top: r,
                                left: o
                            };
                        e.showSuggestions({
                            wordId: a,
                            position: s,
                            word: i,
                            wordStartIndex: l,
                            wordEndIndex: c
                        })
                    }
                    ,
                    t.handleMouseLeave = function () {
                        var e = t.props.spellCheckEmitter
                            , n = t.state.wordId;
                        e.hideSuggestions({
                            wordId: n
                        })
                    }
                    ,
                    t.handleSuggestionItemClick = function (e) {
                        t.updateWordInEditor(e)
                    }
                    ,
                    t.handleIgnoreClick = function () {
                        var e = t.state.word
                            , n = JSON.parse(localStorage.getItem("SPELL_CHECKER_IGNORED_WORDS")) || [];
                        n.push(e),
                            localStorage.setItem("SPELL_CHECKER_IGNORED_WORDS", JSON.stringify(n)),
                            t.updateWordInEditor(e)
                    }
                    ,
                    t.updateWordInEditor = function (e) {
                        var n = t.props
                            , r = n.spellCheckEmitter
                            , o = n.store
                            , a = t.state
                            , i = a.wordId
                            , l = a.blockKey
                            , c = E(o.getEditorState(), e, t.state.wordStartIndex, t.state.wordEndIndex, l);
                        o.setEditorState(c),
                            r.hideSuggestionsInstantly({
                                wordId: i
                            })
                    }
                    ,
                    t.portalEl = document.createElement("div"),
                    t
            }
            t = e,
                (n = r).prototype = Object.create(t.prototype),
                n.prototype.constructor = n,
                _(n, t);
            var a = r.prototype;
            return a.componentDidMount = function () {
                var e = this.props.spellCheckEmitter;
                e.on("showDropdown", this.handleShowDropdown),
                    e.on("hideDropdown", this.handleHideDropdown)
            }
                ,
                a.componentWillUnmount = function () {
                    var e = this.props.spellCheckEmitter;
                    e.removeListener("showDropdown", this.handleShowDropdown),
                        e.removeListener("hideDropdown", this.handleHideDropdown)
                }
                ,
                a.render = function () {
                    var e = this
                        , n = this.state
                        , t = n.top
                        , r = n.left
                        , a = n.isOpen
                        , i = n.word
                        , l = this.props.incorrectWords.find((function (e) {
                            return e.word === i
                        }
                        ));
                    return l ? k.a.createPortal(o.a.createElement(T, {
                        isOpen: a,
                        onMouseEnter: this.handleMouseOver,
                        onMouseLeave: this.handleMouseLeave,
                        style: {
                            top: t + "px",
                            left: r + "px"
                        }
                    }, l.suggestions.map((function (n) {
                        return o.a.createElement(P, {
                            key: n,
                            onClick: function () {
                                return e.handleSuggestionItemClick(n)
                            }
                        }, o.a.createElement(B, null, o.a.createElement(w.c.Tick, null)), n)
                    }
                    )), !l.suggestions.length && o.a.createElement(D, null, C.a.t("builder.resume_editor.spell_checker_unknown_word")), o.a.createElement(L, null), o.a.createElement(A, {
                        onClick: this.handleIgnoreClick
                    }, o.a.createElement(B, null, o.a.createElement(w.c.InvisibleSmall, null)), "Ignore")), document.body) : null
                }
                ,
                r
        }(r.Component);
        R.propTypes = {
            decoratedText: i.a.string,
            isOpen: i.a.bool,
            spellCheckEmitter: i.a.any.isRequired,
            incorrectWords: i.a.array,
            store: i.a.any.isRequired
        };
        var M, W, K = R, G = t(1627), U = t.n(G);
        function H (e, n) {
            return n || (n = e.slice(0)),
                e.raw = n,
                e
        }
        var q = Object(x.css)(M || (M = H(["\n  background-color: ", ";\n  background-image: linear-gradient(", ", ", ");\n"])), Object(j.b)(j.a.Red300, .2), j.a.Red300, j.a.Red300)
            , F = O.a.span(W || (W = H(["\n  position: relative;\n  ", "\n\n  ", ";\n"])), (function (e) {
                return !e.disabled && "\n    background-size: 100% 2px;\n    background-position: 0 100%;\n    background-image: linear-gradient(\n      " + Object(j.b)(j.a.Red300, .6) + ",\n      " + Object(j.b)(j.a.Red300, .6) + "\n    );\n    padding-bottom: 1px;\n    transition: background-color 0.2s ease;\n  "
            }
            ), (function (e) {
                return e.isActive ? q : ""
            }
            ))
            , N = t(741)
            , Y = t.n(N);
        function z (e, n) {
            return (z = Object.setPrototypeOf || function (e, n) {
                return e.__proto__ = n,
                    e
            }
            )(e, n)
        }
        var J = function (e) {
            var n, t;
            function r () {
                for (var n, t = arguments.length, r = new Array(t), o = 0; o < t; o++)
                    r[o] = arguments[o];
                return (n = e.call.apply(e, [this].concat(r)) || this).state = {
                    isActive: !1
                },
                    n.wordId = Y()(),
                    n.handleHighlightWord = function (e) {
                        n.wordId === e && n.setState({
                            isActive: !0
                        })
                    }
                    ,
                    n.handleDimWord = function (e) {
                        n.wordId === e && n.setState({
                            isActive: !1
                        })
                    }
                    ,
                    n.handleMouseEnter = function (e) {
                        var t = n.props.spellCheckEmitter
                            , r = e.target.getBoundingClientRect()
                            , o = window.scrollY || window.pageYOffset || (document.documentElement ? document.documentElement.scrollTop : 0)
                            , a = {
                                top: Math.round(r.top + o + r.height + 1),
                                left: Math.round(r.left - 16)
                            };
                        t.showSuggestions({
                            blockKey: n.props.children[0].props.block.getKey(),
                            wordId: n.wordId,
                            word: n.props.decoratedText,
                            position: a,
                            wordStartIndex: n.props.children[0].props.start,
                            wordEndIndex: n.props.children[0].props.start + n.props.decoratedText.length
                        })
                    }
                    ,
                    n.handleMouseLeave = function () {
                        n.props.spellCheckEmitter.hideSuggestions({
                            wordId: n.wordId
                        })
                    }
                    ,
                    n
            }
            t = e,
                (n = r).prototype = Object.create(t.prototype),
                n.prototype.constructor = n,
                z(n, t);
            var a = r.prototype;
            return a.componentDidMount = function () {
                var e = this.props.spellCheckEmitter;
                e.on("highlightWord", this.handleHighlightWord),
                    e.on("dimWord", this.handleDimWord)
            }
                ,
                a.componentWillUnmount = function () {
                    var e = this.props.spellCheckEmitter;
                    e.removeListener("highlightWord", this.handleHighlightWord),
                        e.removeListener("dimWord", this.handleDimWord)
                }
                ,
                a.render = function () {
                    return o.a.createElement(F, {
                        onMouseEnter: this.handleMouseEnter,
                        onMouseLeave: this.handleMouseLeave,
                        isActive: this.state.isActive
                    }, this.props.children)
                }
                ,
                r
        }(r.Component);
        J.propTypes = {
            children: i.a.node,
            decoratedText: i.a.string,
            onSelect: i.a.func,
            spellCheckersState: i.a.array,
            spellCheckEmitter: i.a.any.isRequired
        };
        var V = J
            , Q = t(1036)
            , X = t.n(Q)
            , Z = t(514)
            , $ = t.n(Z);
        function ee (e, n) {
            return (ee = Object.setPrototypeOf || function (e, n) {
                return e.__proto__ = n,
                    e
            }
            )(e, n)
        }
        var ne = function (e) {
            var n, t;
            function r () {
                var n;
                return (n = e.call(this) || this).showDropdown = $()((function (e) {
                    var t = e.wordId
                        , r = e.word
                        , o = e.position
                        , a = e.wordStartIndex
                        , i = e.wordEndIndex
                        , l = e.blockKey;
                    n.isDropdownOpen = !0,
                        n.emit("highlightWord", t),
                        n.emit("showDropdown", {
                            wordId: t,
                            word: r,
                            position: o,
                            wordStartIndex: a,
                            wordEndIndex: i,
                            blockKey: l
                        })
                }
                ), 300),
                    n.hideDropdown = $()((function (e) {
                        n.isDropdownOpen = !1,
                            n.wordId = null,
                            n.emit("dimWord", e),
                            n.emit("hideDropdown")
                    }
                    ), 300),
                    n.hideSuggestionsInstantly = function (e) {
                        var t = e.wordId;
                        n.isDropdownOpen = !1,
                            n.wordId = null,
                            n.emit("dimWord", t),
                            n.emit("hideDropdown")
                    }
                    ,
                    n.wordId = null,
                    n.isDropdownOpen = !1,
                    n
            }
            t = e,
                (n = r).prototype = Object.create(t.prototype),
                n.prototype.constructor = n,
                ee(n, t);
            var o = r.prototype;
            return o.showSuggestions = function (e) {
                var n = e.wordId
                    , t = e.word
                    , r = e.position
                    , o = e.wordStartIndex
                    , a = e.wordEndIndex
                    , i = e.blockKey;
                return this.wordId !== n || this.isDropdownOpen ? this.wordId === n && this.isDropdownOpen ? void this.hideDropdown.cancel() : this.wordId !== n && this.isDropdownOpen ? (this.emit("dimWord", this.wordId),
                    this.emit("highlightWord", n),
                    this.emit("showDropdown", {
                        wordId: n,
                        word: t,
                        position: r,
                        wordStartIndex: o,
                        wordEndIndex: a,
                        blockKey: i
                    }),
                    this.wordId = n,
                    void this.hideDropdown.cancel()) : void (null === this.wordId && (this.wordId = n,
                        this.showDropdown({
                            wordId: n,
                            word: t,
                            position: r,
                            wordStartIndex: o,
                            wordEndIndex: a,
                            blockKey: i
                        }),
                        this.hideDropdown.cancel())) : (this.showDropdown.cancel(),
                            void this.showDropdown({
                                wordId: n,
                                word: t,
                                position: r,
                                wordStartIndex: o,
                                wordEndIndex: a,
                                blockKey: i
                            }))
            }
                ,
                o.hideSuggestions = function (e) {
                    var n = e.wordId;
                    if (!this.isDropdownOpen)
                        return this.showDropdown.cancel(),
                            this.wordId = null,
                            void this.emit("dimWord", n);
                    this.hideDropdown(n)
                }
                ,
                r
        }(X.a)
            , te = function (e, n) {
                return {
                    strategy: e,
                    component: V,
                    props: {
                        spellCheckEmitter: n
                    }
                }
            }
            , re = function (e) {
                var n = new ne
                    , t = {
                        getEditorState: void 0,
                        setEditorState: void 0
                    };
                return {
                    SpellCheckDropdown: U()(K, {
                        spellCheckEmitter: n,
                        store: t
                    }),
                    decorators: [te(e, n)],
                    initialize: function (e) {
                        var n = e.getEditorState
                            , r = e.setEditorState;
                        t.getEditorState = n,
                            t.setEditorState = r
                    }
                }
            }
            , oe = t(1475)
            , ae = t(19)
            , ie = t(1632)
            , le = t.n(ie)
            , ce = t(233)
            , se = t(14)
            , ue = t(28)
            , de = t(167)
            , pe = t(567)
            , he = t(266)
            , fe = t(9)
            , ge = t.n(fe);
        function be (e, n) {
            var t = Object.keys(e);
            if (Object.getOwnPropertySymbols) {
                var r = Object.getOwnPropertySymbols(e);
                n && (r = r.filter((function (n) {
                    return Object.getOwnPropertyDescriptor(e, n).enumerable
                }
                ))),
                    t.push.apply(t, r)
            }
            return t
        }
        function me (e) {
            for (var n = 1; n < arguments.length; n++) {
                var t = null != arguments[n] ? arguments[n] : {};
                n % 2 ? be(Object(t), !0).forEach((function (n) {
                    ye(e, n, t[n])
                }
                )) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : be(Object(t)).forEach((function (n) {
                    Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n))
                }
                ))
            }
            return e
        }
        function ye (e, n, t) {
            return n in e ? Object.defineProperty(e, n, {
                value: t,
                enumerable: !0,
                configurable: !0,
                writable: !0
            }) : e[n] = t,
                e
        }
        function ve (e, n, t, r, o, a, i) {
            try {
                var l = e[a](i)
                    , c = l.value
            } catch (s) {
                return void t(s)
            }
            l.done ? n(c) : Promise.resolve(c).then(r, o)
        }
        function ke (e, n) {
            return function (e) {
                if (Array.isArray(e))
                    return e
            }(e) || function (e, n) {
                var t = e && ("undefined" !== typeof Symbol && e[Symbol.iterator] || e["@@iterator"]);
                if (null == t)
                    return;
                var r, o, a = [], i = !0, l = !1;
                try {
                    for (t = t.call(e); !(i = (r = t.next()).done) && (a.push(r.value),
                        !n || a.length !== n); i = !0)
                        ;
                } catch (c) {
                    l = !0,
                        o = c
                } finally {
                    try {
                        i || null == t.return || t.return()
                    } finally {
                        if (l)
                            throw o
                    }
                }
                return a
            }(e, n) || function (e, n) {
                if (!e)
                    return;
                if ("string" === typeof e)
                    return we(e, n);
                var t = Object.prototype.toString.call(e).slice(8, -1);
                "Object" === t && e.constructor && (t = e.constructor.name);
                if ("Map" === t || "Set" === t)
                    return Array.from(e);
                if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
                    return we(e, n)
            }(e, n) || function () {
                throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
            }()
        }
        function we (e, n) {
            (null == n || n > e.length) && (n = e.length);
            for (var t = 0, r = new Array(n); t < n; t++)
                r[t] = e[t];
            return r
        }
        var Ee, Se, Ce, xe, Oe, je, Ie, Te, Pe, De, Le, Ae, Be, _e, Re, Me, We, Ke, Ge, Ue, He, qe, Fe, Ne, Ye, ze, Je, Ve, Qe, Xe, Ze, $e = function (e) {
            var n = e.scope
                , t = e.locale
                , o = e.query
                , a = ke(Object(r.useState)(se.c.notAsked), 2)
                , i = a[0]
                , l = a[1]
                , c = ke(Object(r.useState)({
                    result: [],
                    categories: [],
                    categoryFilter: null,
                    foundAnything: null
                }), 2)
                , s = c[0]
                , u = c[1]
                , d = Object(r.useRef)()
                , p = Object(r.useCallback)(function () {
                    var e, r = (e = ge.a.mark((function e (r) {
                        var o, a, i;
                        return ge.a.wrap((function (e) {
                            for (; ;)
                                switch (e.prev = e.next) {
                                    case 0:
                                        if (r !== d.current) {
                                            e.next = 2;
                                            break
                                        }
                                        return e.abrupt("return");
                                    case 2:
                                        return l(se.c.loading),
                                            d.current = r,
                                            o = {
                                                query: r,
                                                locale: t
                                            },
                                            e.next = 7,
                                            ue.a.get(se.a + "/phrases/" + n + "/search", {
                                                params: o
                                            });
                                    case 7:
                                        if (a = e.sent,
                                            (i = a.data).query === d.current) {
                                            e.next = 11;
                                            break
                                        }
                                        return e.abrupt("return");
                                    case 11:
                                        u(i),
                                            l(se.c.loaded);
                                    case 13:
                                    case "end":
                                        return e.stop()
                                }
                        }
                        ), e)
                    }
                    )),
                        function () {
                            var n = this
                                , t = arguments;
                            return new Promise((function (r, o) {
                                var a = e.apply(n, t);
                                function i (e) {
                                    ve(a, r, o, i, l, "next", e)
                                }
                                function l (e) {
                                    ve(a, r, o, i, l, "throw", e)
                                }
                                i(void 0)
                            }
                            ))
                        }
                    );
                    return function (e) {
                        return r.apply(this, arguments)
                    }
                }(), [t, n]);
            return en((function () {
                return p(o)
            }
            ), 350, [o, t, n]),
                me(me({}, s), {}, {
                    status: i,
                    performSearch: p
                })
        }, en = function (e, n, t) {
            void 0 === t && (t = []),
                Object(r.useEffect)((function () {
                    var t = setTimeout(e, n);
                    return function () {
                        return clearTimeout(t)
                    }
                }
                ), [n].concat(t))
        }, nn = function (e) {
            return Object(r.useMemo)((function () {
                return e.split("**").map((function (e, n) {
                    return Object(r.createElement)(n % 2 ? "b" : "span", {
                        key: n
                    }, e)
                }
                ))
            }
            ), [e])
        }, tn = t(176), rn = t.n(tn), on = t(8), an = t(130);
        function ln (e, n) {
            return n || (n = e.slice(0)),
                e.raw = n,
                e
        }
        var cn = O.a.div(Ee || (Ee = ln(["\n  position: absolute;\n  overflow: hidden;\n  z-index: 15;\n  left: 100%;\n  top: 0;\n  width: ", "px;\n  margin-left: 16px;\n\n  border-radius: 3px;\n  background: ", ";\n  box-shadow: 0px 0px 1px rgba(23, 68, 130, 0.2), 0px 2px 14px rgba(23, 68, 130, 0.15);\n\n  opacity: 0;\n  transform-origin: 0 0;\n  transform: translateX(-8px) translateZ(0);\n  transition-property: opacity, transform;\n  transition-timing-function: ease-out;\n  transition-duration: 0.15s;\n\n  ", "\n"])), (function (e) {
            return e.wide ? 560 : 420
        }
        ), j.a.White, (function (e) {
            return e.isVisible && Object(x.css)(Se || (Se = ln(["\n      transform: translateX(0) translateZ(0);\n      opacity: 1;\n    "])))
        }
        ))
            , sn = O.a.div(Ce || (Ce = ln(["\n  position: relative;\n  border-bottom: 1px solid ", ";\n"])), j.a.Gray150)
            , un = O()(w.b.Zoom)(xe || (xe = ln(["\n  position: absolute;\n  left: 12px;\n  top: 12px;\n  color: ", ";\n"])), j.a.Gray400)
            , dn = O.a.input(Oe || (Oe = ln(["\n  display: block;\n  width: 100%;\n  background: none;\n  padding: 13px 44px 11px;\n  margin: 0;\n  border: none;\n  color: ", ";\n\n  &::placeholder {\n    color: ", ";\n  }\n"])), j.a.Black300, j.a.Gray500)
            , pn = Object(x.keyframes)(je || (je = ln(["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"])))
            , hn = O()(w.b.Spinner)(Ie || (Ie = ln(["\n  position: absolute;\n  top: 12px;\n  right: 16px;\n  color: ", ";\n  animation: ", " 0.5s infinite linear;\n"])), j.a.Gray400, pn)
            , fn = O.a.div(Te || (Te = ln([""])))
            , gn = O.a.div(Pe || (Pe = ln(["\n  display: flex;\n  flex-wrap: wrap;\n  padding: 4px 12px;\n  border-bottom: 1px solid ", ";\n\n  &:last-child {\n    border-bottom: none;\n  }\n"])), j.a.Gray150)
            , bn = O.a.div(De || (De = ln(["\n  ", ";\n  margin: 4px;\n  padding: 4px 8px;\n  border-radius: 3px;\n  background-color: ", ";\n  color: ", ";\n  white-space: nowrap;\n  cursor: pointer;\n\n  &:hover {\n    background-color: ", ";\n    color: ", ";\n  }\n\n  ", "\n"])), on.a.Caption, j.a.Gray100, j.a.Gray600, j.a.Blue100, j.a.Blue300, (function (e) {
                return e.isActive && Object(x.css)(Le || (Le = ln(["\n      background-color: ", ";\n      color: ", ";\n      pointer-events: none;\n    "])), j.a.Blue300, j.a.White)
            }
            ))
            , mn = O.a.div(Ae || (Ae = ln(["\n  ", ";\n  padding: 12px 16px;\n  border-bottom: 1px solid ", ";\n  color: ", ";\n\n  &:last-child {\n    border-bottom: none;\n  }\n"])), on.a.Caption, j.a.Gray150, j.a.Gray500)
            , yn = O.a.div(Be || (Be = ln(["\n  overflow-y: scroll;\n  max-height: 300px;\n\n  &::-webkit-scrollbar {\n    width: 12px;\n    background-color: transparent;\n  }\n\n  &::-webkit-scrollbar-thumb {\n    background-color: ", ";\n    border: 4px solid ", ";\n    border-radius: 6px;\n\n    &:hover {\n      background-color: ", ";\n    }\n  }\n"])), j.a.Gray200, j.a.White, j.a.Gray300)
            , vn = O.a.div(_e || (_e = ln(["\n  border-bottom: 1px solid ", ";\n\n  &:last-child {\n    border-bottom: none;\n  }\n"])), j.a.Gray150)
            , kn = O.a.div(Re || (Re = ln(["\n  ", ";\n  padding: 8px 16px 6px;\n  color: ", ";\n  text-transform: uppercase;\n\n  ", "\n\n  svg {\n    margin-right: 8px;\n  }\n"])), on.a.Caps, j.a.Gray500, (function (e) {
                return "most_popular" === e.groupType && Object(x.css)(Me || (Me = ln(["\n      color: ", ";\n    "])), j.a.Yellow400)
            }
            ))
            , wn = O.a.div(We || (We = ln(["\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n  padding: 6px 16px;\n\n  ", "\n\n  &:last-child {\n    padding-bottom: 16px;\n  }\n"])), (function (e) {
                return e.hasSubphrases && Object(x.css)(Ke || (Ke = ln(["\n      align-items: flex-start;\n      ", ";\n    "])), on.a.Caption)
            }
            ))
            , En = O()(wn)(Ge || (Ge = ln(["\n  cursor: ", ";\n  transition: color 0.15s;\n\n  &.is-phrase-hover {\n    color: ", ";\n  }\n\n  &.is-phrase-added {\n    color: ", ";\n    pointer-events: none;\n  }\n"])), (function (e) {
                return e.hasSubphrases ? "default" : "pointer"
            }
            ), j.a.Blue300, j.a.Gray500)
            , Sn = O.a.div(Ue || (Ue = ln(["\n  flex-grow: 1;\n\n  & b {\n    font-weight: 600;\n  }\n"])))
            , Cn = O.a.span(He || (He = ln(["\n  position: relative;\n  border-radius: 0 3px 3px 0;\n  margin-left: -3px;\n  padding: 1px 3px;\n\n  transition: color 0.2s, background-color 0.2s;\n  cursor: pointer;\n\n  &:hover,\n  .is-phrase-hover &,\n  .is-phrase-hover &.is-subphrase-added {\n    color: ", ";\n  }\n\n  &:hover {\n    background-color: ", ";\n    /* Prevent hover loss when cursor is between lines */\n    border-top: 2px solid ", ";\n    border-bottom: 2px solid ", ";\n  }\n\n  &:active {\n    color: ", ";\n    background-color: ", ";\n  }\n\n  &.is-subphrase-added {\n    color: ", ";\n    pointer-events: none;\n  }\n"])), j.a.Blue300, j.a.Blue100, j.a.White, j.a.White, j.a.Gray500, j.a.Gray100, j.a.Gray500)
            , xn = O.a.span(qe || (qe = ln(["\n  position: absolute;\n  top: 0;\n  left: -10px;\n  width: 10px;\n  height: 18px;\n  background-image: url(", ");\n  opacity: 0;\n  transition: opacity 0.2s;\n\n  ", ":hover & {\n    opacity: 1;\n  }\n"])), t(1634), Cn)
            , On = O.a.span(Fe || (Fe = ln(["\n  font-size: 0;\n  line-height: 0;\n  opacity: 0;\n"])))
            , jn = O.a.span(Ne || (Ne = ln(["\n  padding: 0 3px;\n  margin-right: 3px;\n  color: ", ";\n\n  &:last-child {\n    display: none;\n  }\n"])), j.a.Gray400)
            , In = O.a.div(Ye || (Ye = ln(["\n  position: relative;\n  flex-shrink: 0;\n  width: 32px;\n  height: 32px;\n  margin-right: 16px;\n  border-radius: 50%;\n"])))
            , Tn = O()(In)(ze || (ze = ln(["\n  padding: 6px;\n  background-color: ", ";\n  color: ", ";\n  transition: color 0.2s, background-color 0.2s;\n  will-change: color, background-color;\n  cursor: pointer;\n\n  .is-phrase-hover & {\n    background-color: ", ";\n    color: ", ";\n  }\n\n  .is-phrase-added & {\n    background-color: #e3f6ec;\n    color: ", ";\n  }\n"])), j.a.Gray100, j.a.Gray500, j.a.Blue100, j.a.Blue300, j.a.Green300)
            , Pn = O()(w.a.ArrowLeft)(Je || (Je = ln(["\n  display: block;\n  will-change: opacity, transform;\n  transition-property: transform, opacity;\n  transition-duration: 0.2s;\n\n  .is-phrase-added & {\n    transform: translateX(-10px);\n    opacity: 0;\n  }\n"])))
            , Dn = O()(w.a.Tick)(Ve || (Ve = ln(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin: -10px 0 0 -10px;\n  opacity: 0;\n  transform: scale(0.6);\n  will-change: opacity, transform;\n  transition-property: transform, opacity;\n  transition-duration: 0.2s;\n  transition-delay: 0.1s;\n\n  .is-phrase-added & {\n    transform: scale(1);\n    opacity: 1;\n  }\n"])))
            , Ln = O()(wn)(Qe || (Qe = ln([""])))
            , An = O()(In)(Xe || (Xe = ln(["\n  ", ";\n"])), an.a.placeholderBackground)
            , Bn = O.a.div(Ze || (Ze = ln(["\n  display: inline-block;\n  width: 100%;\n  height: 1em;\n  border-radius: 3px;\n  ", ";\n  vertical-align: middle;\n\n  &:last-child {\n    width: 50%;\n  }\n"])), an.a.placeholderBackground)
            , _n = function () {
                return o.a.createElement(vn, null, o.a.createElement(kn, null, o.a.createElement(Bn, null)), rn()(3, (function (e) {
                    return o.a.createElement(Ln, {
                        key: e
                    }, o.a.createElement(An, null), o.a.createElement(Sn, null, o.a.createElement(Bn, null), o.a.createElement(Bn, null)))
                }
                )))
            }
            , Rn = function (e) {
                var n = e.item
                    , t = e.onClick
                    , a = n.digest
                    , i = n.isActive
                    , l = n.highlight
                    , c = nn(l)
                    , s = Object(r.useCallback)((function () {
                        return t(n)
                    }
                    ), [n, t]);
                return o.a.createElement(Cn, {
                    key: a,
                    className: i ? "is-subphrase-added" : "",
                    onClick: s
                }, o.a.createElement(xn, null), o.a.createElement(On, null, "\xa0"), c)
            };
        Rn.propTypes = {
            item: i.a.object.isRequired,
            onClick: i.a.func.isRequired
        };
        var Mn = o.a.memo(Rn);
        function Wn () {
            return (Wn = Object.assign || function (e) {
                for (var n = 1; n < arguments.length; n++) {
                    var t = arguments[n];
                    for (var r in t)
                        Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
                }
                return e
            }
            ).apply(this, arguments)
        }
        function Kn (e, n) {
            return function (e) {
                if (Array.isArray(e))
                    return e
            }(e) || function (e, n) {
                var t = e && ("undefined" !== typeof Symbol && e[Symbol.iterator] || e["@@iterator"]);
                if (null == t)
                    return;
                var r, o, a = [], i = !0, l = !1;
                try {
                    for (t = t.call(e); !(i = (r = t.next()).done) && (a.push(r.value),
                        !n || a.length !== n); i = !0)
                        ;
                } catch (c) {
                    l = !0,
                        o = c
                } finally {
                    try {
                        i || null == t.return || t.return()
                    } finally {
                        if (l)
                            throw o
                    }
                }
                return a
            }(e, n) || function (e, n) {
                if (!e)
                    return;
                if ("string" === typeof e)
                    return Gn(e, n);
                var t = Object.prototype.toString.call(e).slice(8, -1);
                "Object" === t && e.constructor && (t = e.constructor.name);
                if ("Map" === t || "Set" === t)
                    return Array.from(e);
                if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
                    return Gn(e, n)
            }(e, n) || function () {
                throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
            }()
        }
        function Gn (e, n) {
            (null == n || n > e.length) && (n = e.length);
            for (var t = 0, r = new Array(n); t < n; t++)
                r[t] = e[t];
            return r
        }
        var Un = function (e) {
            var n = e.item
                , t = e.onClick
                , a = n.isActive
                , i = n.highlight
                , l = n.subphrases
                , c = Kn(Object(r.useState)(!1), 2)
                , s = c[0]
                , u = c[1]
                , d = nn(i)
                , p = l && l.length > 0
                , h = [a && "is-phrase-added", s && "is-phrase-hover"].filter(Boolean)
                , f = {
                    onClick: Object(r.useCallback)((function () {
                        return t(n)
                    }
                    ), [t, n]),
                    onMouseEnter: Object(r.useCallback)((function () {
                        return u(!0)
                    }
                    ), []),
                    onMouseLeave: Object(r.useCallback)((function () {
                        return u(!1)
                    }
                    ), [])
                }
                , g = p ? {} : f
                , b = p ? f : {};
            return o.a.createElement(En, Wn({
                className: h.join(" "),
                hasSubphrases: p
            }, g), o.a.createElement(Tn, b, o.a.createElement(Pn, null), o.a.createElement(Dn, null)), !p && o.a.createElement(Sn, null, d), p && o.a.createElement(Sn, null, l.map((function (e) {
                return o.a.createElement(o.a.Fragment, {
                    key: e.digest
                }, o.a.createElement(Mn, {
                    item: e,
                    onClick: t
                }), o.a.createElement(jn, null, "\u2022"))
            }
            ))))
        };
        Un.propTypes = {
            item: i.a.object.isRequired,
            onClick: i.a.func.isRequired
        };
        var Hn = o.a.memo(Un);
        function qn (e, n) {
            var t = Object.keys(e);
            if (Object.getOwnPropertySymbols) {
                var r = Object.getOwnPropertySymbols(e);
                n && (r = r.filter((function (n) {
                    return Object.getOwnPropertyDescriptor(e, n).enumerable
                }
                ))),
                    t.push.apply(t, r)
            }
            return t
        }
        function Fn (e) {
            for (var n = 1; n < arguments.length; n++) {
                var t = null != arguments[n] ? arguments[n] : {};
                n % 2 ? qn(Object(t), !0).forEach((function (n) {
                    Nn(e, n, t[n])
                }
                )) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : qn(Object(t)).forEach((function (n) {
                    Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n))
                }
                ))
            }
            return e
        }
        function Nn (e, n, t) {
            return n in e ? Object.defineProperty(e, n, {
                value: t,
                enumerable: !0,
                configurable: !0,
                writable: !0
            }) : e[n] = t,
                e
        }
        function Yn (e, n) {
            return function (e) {
                if (Array.isArray(e))
                    return e
            }(e) || function (e, n) {
                var t = e && ("undefined" !== typeof Symbol && e[Symbol.iterator] || e["@@iterator"]);
                if (null == t)
                    return;
                var r, o, a = [], i = !0, l = !1;
                try {
                    for (t = t.call(e); !(i = (r = t.next()).done) && (a.push(r.value),
                        !n || a.length !== n); i = !0)
                        ;
                } catch (c) {
                    l = !0,
                        o = c
                } finally {
                    try {
                        i || null == t.return || t.return()
                    } finally {
                        if (l)
                            throw o
                    }
                }
                return a
            }(e, n) || function (e, n) {
                if (!e)
                    return;
                if ("string" === typeof e)
                    return zn(e, n);
                var t = Object.prototype.toString.call(e).slice(8, -1);
                "Object" === t && e.constructor && (t = e.constructor.name);
                if ("Map" === t || "Set" === t)
                    return Array.from(e);
                if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
                    return zn(e, n)
            }(e, n) || function () {
                throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
            }()
        }
        function zn (e, n) {
            (null == n || n > e.length) && (n = e.length);
            for (var t = 0, r = new Array(n); t < n; t++)
                r[t] = e[t];
            return r
        }
        var Jn = function (e) {
            var n = e.scope
                , t = e.locale
                , a = e.text
                , i = e.wide
                , l = e.onSelect
                , c = e.onClose
                , s = Yn(Object(r.useState)(!1), 2)
                , u = s[0]
                , d = s[1]
                , p = Yn(Object(r.useState)(""), 2)
                , h = p[0]
                , f = p[1]
                , g = Object(r.useRef)()
                , b = Object(r.useRef)()
                , m = $e({
                    scope: n,
                    query: h,
                    locale: t
                })
                , y = m.status
                , v = m.result
                , k = m.categories
                , E = m.categoryFilter
                , S = m.foundAnything
                , x = m.performSearch
                , O = 0 === v.length && y !== se.c.loaded;
            Object(r.useLayoutEffect)((function () {
                Object(de.a)(g.current),
                    d(!0)
            }
            ), []),
                Object(r.useLayoutEffect)((function () {
                    b.current.scrollTop = 0
                }
                ), [v]);
            var j = Object(r.useCallback)((function (e) {
                f(e),
                    x(e)
            }
            ), [x])
                , I = Object(r.useCallback)((function (e) {
                    l(e),
                        ue.a.post(se.a + "/phrases/" + e.digest + "/use"),
                        Object(ae.b)("Resume Editor", "Add Pre-written Phrase")
                }
                ), [l])
                , T = Object(r.useCallback)((function (e) {
                    e.stopPropagation(),
                        c()
                }
                ), [c]);
            Object(he.a)(g, T),
                Object(pe.a)(c);
            var P = Object(r.useMemo)((function () {
                var e = function e (n) {
                    var t = n.subphrases ? n.subphrases.map(e) : [];
                    t = t.map((function (e) {
                        return Fn(Fn({}, e), {}, {
                            isSubphrase: !0
                        })
                    }
                    ));
                    var r = a.includes(n.phrase)
                        , o = t.length > 0 && t.every((function (e) {
                            return e.isActive
                        }
                        ));
                    return Fn(Fn({}, n), {}, {
                        subphrases: t,
                        isActive: r || o
                    })
                };
                return v.map((function (n) {
                    return Fn(Fn({}, n), {}, {
                        phrases: n.phrases.map(e)
                    })
                }
                ))
            }
            ), [v, a]);
            return o.a.createElement(cn, {
                ref: g,
                isVisible: u,
                wide: i
            }, o.a.createElement(sn, null, o.a.createElement(un, null), o.a.createElement(dn, {
                placeholder: C.a.t("builder.resume_editor.phrase_suggestion.search_placeholder"),
                onChange: function (e) {
                    return f(e.target.value)
                },
                value: h,
                autoFocus: !0
            }), y !== se.c.loaded && o.a.createElement(hn, null)), o.a.createElement(fn, null, k.length > 0 && o.a.createElement(gn, null, k.map((function (e, n) {
                return o.a.createElement(bn, {
                    key: n,
                    isActive: E === e,
                    onClick: function () {
                        return j(e)
                    }
                }, e)
            }
            ))), !1 === S && o.a.createElement(mn, null, C.a.t("builder.resume_editor.phrase_suggestion.no_results")), o.a.createElement(yn, {
                ref: b
            }, O && o.a.createElement(_n, null), !O && P.map((function (e, n) {
                return o.a.createElement(vn, {
                    key: n
                }, o.a.createElement(kn, {
                    groupType: e.groupType
                }, "most_popular" === e.groupType && o.a.createElement(w.a.Crown, null), e.groupTitle), e.phrases.map((function (e) {
                    return o.a.createElement(Hn, {
                        key: e.digest,
                        isActive: a.includes(e.phrase),
                        item: e,
                        onClick: I
                    })
                }
                )))
            }
            )))))
        };
        Jn.propTypes = {
            scope: i.a.string.isRequired,
            locale: i.a.string,
            text: i.a.string,
            wide: i.a.bool,
            onSelect: i.a.func,
            onClose: i.a.func
        },
            Jn.defaultProps = {
                locale: "en",
                text: "",
                wide: !1,
                onSelect: function () { },
                onClose: function () { }
            };
        var Vn, Qn, Xn, Zn, $n, et, nt, tt, rt, ot, at, it, lt, ct, st, ut, dt, pt, ht = Jn, ft = t(109), gt = t(1516), bt = t(1517), mt = function (e) {
            var n = e.getSelection()
                , t = n.getStartKey()
                , r = e.getCurrentContent().getBlockForKey(t)
                , o = n.getStartOffset();
            if (n.isCollapsed())
                return function (e, n) {
                    var t = e.getEntityAt(n);
                    if (null == t)
                        return null;
                    for (var r = n; r > 0 && e.getEntityAt(r - 1) === t;)
                        r -= 1;
                    for (var o = r, a = e.getLength(); o < a && e.getEntityAt(o + 1) === t;)
                        o += 1;
                    return {
                        entityKey: t,
                        blockKey: e.getKey(),
                        startOffset: r,
                        endOffset: o + 1
                    }
                }(r, 0 === o ? o : o - 1);
            if (t !== n.getEndKey())
                return null;
            for (var a = n.getEndOffset(), i = r.getEntityAt(o), l = o; l < a; l++) {
                var c = r.getEntityAt(l);
                if (null == c || c !== i)
                    return null
            }
            return {
                entityKey: i,
                blockKey: r.getKey(),
                startOffset: o,
                endOffset: a
            }
        }, yt = function (e, n) {
            var t = l.EditorState.moveSelectionToEnd(e)
                , r = t.getSelection()
                , o = t.getCurrentContent()
                , a = 0 === o.getLastBlock().getLength() ? "" : " "
                , i = l.Modifier.insertText(o, r, a + n)
                , c = l.EditorState.push(t, i, "insert-characters");
            return l.EditorState.moveSelectionToEnd(c)
        }, vt = function (e, n) {
            var t = e.getCurrentContent()
                , r = Object(bt.stateToHTML)(t)
                , o = Object(gt.stateFromHTML)(r + n)
                , a = l.EditorState.push(e, o, "insert-fragment");
            return l.EditorState.moveSelectionToEnd(a)
        }, kt = "BOLD", wt = "ITALIC", Et = "UNDERLINE", St = "STRIKETHROUGH", Ct = "ordered-list-item", xt = "unordered-list-item";
        function Ot (e, n) {
            return n || (n = e.slice(0)),
                e.raw = n,
                e
        }
        var jt = O.a.div(Vn || (Vn = Ot(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 12px 12px 0 12px;\n"])))
            , It = O.a.div(Qn || (Qn = Ot(["\n  width: 24px;\n  height: 24px;\n  background-color: ", ";\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: ", ";\n\n  &:hover {\n    color: ", ";\n  }\n\n  ", ";\n\n  ", ";\n"])), j.a.Gray100, j.a.Black100, j.a.Blue400, (function (e) {
                return e.isActive && "\n    color: " + j.a.Blue400 + ";\n  "
            }
            ), (function (e) {
                return e.isDisabled && "\n    color: " + j.a.Gray400 + ";\n    pointer-events: none;\n  "
            }
            ))
            , Tt = O.a.div(Xn || (Xn = Ot(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 12px;\n"])))
            , Pt = O.a.div(Zn || (Zn = Ot(["\n  display: flex;\n  align-items: center;\n"])))
            , Dt = O.a.div($n || ($n = Ot(["\n  height: 20px;\n  width: 1px;\n  margin: 0 10px;\n  background-color: ", ";\n"])), j.a.Gray300)
            , Lt = (O.a.a(et || (et = Ot(["\n  color: ", ";\n"])), j.a.Blue300),
                O.a.div(nt || (nt = Ot(["\n  display: flex;\n  align-items: center;\n  ", ";\n  color: ", ";\n  cursor: pointer;\n  user-select: none;\n  pointer-events: ", ";\n\n  &:hover {\n    color: ", ";\n  }\n"])), on.a.Caption, j.a.Gray500, (function (e) {
                    return e.isDisabled ? "none" : "auto"
                }
                ), j.a.Blue400))
            , At = O.a.span(tt || (tt = Ot([""])))
            , Bt = Object(x.keyframes)(rt || (rt = Ot(["\n  from {\n    transform: rotate(0deg);\n  }\n\n  to {\n    transform: rotate(360deg);\n  }\n"])))
            , _t = O.a.div(ot || (ot = Ot(["\n  margin-left: 8px;\n  color: ", ";\n  background-color: ", ";\n  border-radius: 50%;\n\n  & svg {\n    display: block;\n  }\n\n  ", "\n"])), j.a.White, j.a.Blue400, (function (e) {
                return e.isLoading && Object(x.css)(at || (at = Ot(["\n      background-color: ", ";\n      animation: ", " 0.5s infinite linear;\n    "])), j.a.Gray500, Bt)
            }
            ))
            , Rt = O.a.div(it || (it = Ot(["\n  position: relative;\n"])))
            , Mt = O.a.div(lt || (lt = Ot(["\n  display: flex;\n  align-items: center;\n  position: absolute;\n  left: 3px;\n  bottom: 3px;\n"])))
            , Wt = Object(x.keyframes)(ct || (ct = Ot(["\n  0% {\n    opacity: 0;\n  }\n\n  50% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))
            , Kt = O.a.div(st || (st = Ot(["\n  width: 3px;\n  height: 3px;\n  margin-right: 2px;\n  background-color: ", ";\n  border-radius: 50%;\n  opacity: 0;\n  animation: ", " 1.5s infinite linear;\n\n  &:last-child {\n    margin: 0;\n  }\n"])), j.a.Blue300, Wt)
            , Gt = O()(Kt)(ut || (ut = Ot([""])))
            , Ut = O()(Kt)(dt || (dt = Ot(["\n  animation-delay: 0.2s;\n"])))
            , Ht = O()(Kt)(pt || (pt = Ot(["\n  animation-delay: 0.4s;\n"])));
        function qt () {
            return (qt = Object.assign || function (e) {
                for (var n = 1; n < arguments.length; n++) {
                    var t = arguments[n];
                    for (var r in t)
                        Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
                }
                return e
            }
            ).apply(this, arguments)
        }
        function Ft (e, n) {
            return (Ft = Object.setPrototypeOf || function (e, n) {
                return e.__proto__ = n,
                    e
            }
            )(e, n)
        }
        var Nt = function (e) {
            var n, t;
            function r () {
                for (var n, t = arguments.length, r = new Array(t), a = 0; a < t; a++)
                    r[a] = arguments[a];
                return (n = e.call.apply(e, [this].concat(r)) || this).state = {
                    isPhrasesDropdownOpen: !1
                },
                    n.getCurrentBlockType = function () {
                        var e = n.props.editorState
                            , t = e.getSelection();
                        return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()
                    }
                    ,
                    n.entityAtCursor = function () {
                        var e = n.props.editorState
                            , t = e.getCurrentContent()
                            , r = mt(e);
                        return null == r ? null : t.getEntity(r.entityKey)
                    }
                    ,
                    n.wrapLink = function (e) {
                        var t = n.props.editorState
                            , r = t.getCurrentContent()
                            , o = t.getSelection()
                            , a = o
                            , i = !1;
                        if (o.isCollapsed()) {
                            var c = mt(t);
                            c && (i = !0,
                                o = o.merge({
                                    anchorOffset: c.startOffset,
                                    focusOffset: c.endOffset,
                                    isBackward: !1
                                }))
                        } else
                            i = !0;
                        if (i) {
                            var s = (r = r.createEntity(oe.ENTITY_TYPE.LINK, "MUTABLE", {
                                url: e
                            })).getLastCreatedEntityKey();
                            t = l.EditorState.push(t, r),
                                t = l.RichUtils.toggleLink(t, o, s),
                                t = l.EditorState.acceptSelection(t, a),
                                n.props.onChange(t)
                        }
                        n.focusEditor()
                    }
                    ,
                    n.addPhrase = function (e) {
                        var t = n.props
                            , r = t.editorState
                            , o = t.onChange
                            , a = le()(e.phrase);
                        if (e.isSubphrase)
                            o(yt(r, a));
                        else {
                            var i = n.props.suggestionConfig.scope;
                            o(vt(r, "profile" === i ? "<p>" + a + "</p>" : "<ul><li>" + a + "</li></ul>"))
                        }
                    }
                    ,
                    n.handleClickMark = function (e, t) {
                        e.preventDefault(),
                            n.props.onToggleInline(t)
                    }
                    ,
                    n.handleClickBlock = function (e, t) {
                        e.preventDefault(),
                            n.props.onToggleBlock(t),
                            n.focusEditor()
                    }
                    ,
                    n.handleClickUndo = function () {
                        var e = n.props
                            , t = e.editorState;
                        (0,
                            e.onChange)(l.EditorState.undo(t))
                    }
                    ,
                    n.handleClickRedo = function () {
                        var e = n.props
                            , t = e.editorState;
                        (0,
                            e.onChange)(l.EditorState.redo(t))
                    }
                    ,
                    n.handleClickLink = function (e) {
                        e.preventDefault();
                        var t = n.entityAtCursor();
                        if (null != t && t.type === oe.ENTITY_TYPE.LINK)
                            n.unwrapLink();
                        else {
                            var r = window.prompt("Enter the URL of the link:");
                            if (!r)
                                return;
                            n.wrapLink(r)
                        }
                    }
                    ,
                    n.handleAddPhrasesClick = function () {
                        n.setState({
                            isPhrasesDropdownOpen: !0
                        }),
                            Object(ae.b)("Resume Editor", "Open Phrase Suggest")
                    }
                    ,
                    n.renderAction = function () {
                        var e = n.props
                            , t = e.editorState
                            , r = e.suggestionMode
                            , a = e.suggestionConfig
                            , i = e.mediaQueries
                            , l = e.locale;
                        return "phrases" !== r || i.isLaptop ? null : o.a.createElement(o.a.Fragment, null, o.a.createElement(Lt, {
                            onClick: n.handleAddPhrasesClick
                        }, o.a.createElement(At, null, C.a.t("builder.resume_editor.phrase_suggestion.toolbar_action")), o.a.createElement(_t, null, o.a.createElement(w.a.Add, null))), n.state.isPhrasesDropdownOpen && o.a.createElement(ht, qt({
                            onClose: function () {
                                return n.setState({
                                    isPhrasesDropdownOpen: !1
                                })
                            },
                            text: t.getCurrentContent().getPlainText(),
                            onSelect: n.addPhrase,
                            locale: l
                        }, a)))
                    }
                    ,
                    n.renderIcon = function (e) {
                        switch (e) {
                            case kt:
                                return o.a.createElement(w.c.Bold, null);
                            case wt:
                                return o.a.createElement(w.c.Italic, null);
                            case Et:
                                return o.a.createElement(w.c.Underline, null);
                            case St:
                                return o.a.createElement(w.c.Strike, null);
                            case Ct:
                                return o.a.createElement(w.c.OrderedList, null);
                            case xt:
                                return o.a.createElement(w.c.UnorderedList, null);
                            default:
                                return o.a.createElement(w.c.Add, null)
                        }
                    }
                    ,
                    n.renderMarkButton = function (e) {
                        var t = n.props.editorState.getCurrentInlineStyle().has(e);
                        return o.a.createElement(It, {
                            onMouseDown: function (t) {
                                return n.handleClickMark(t, e)
                            },
                            isActive: t
                        }, n.renderIcon(e))
                    }
                    ,
                    n.renderBlockButton = function (e) {
                        var t = n.getCurrentBlockType()
                            , r = e === t;
                        return o.a.createElement(It, {
                            onMouseDown: function (t) {
                                return n.handleClickBlock(t, e)
                            },
                            isActive: r
                        }, n.renderIcon(e))
                    }
                    ,
                    n
            }
            t = e,
                (n = r).prototype = Object.create(t.prototype),
                n.prototype.constructor = n,
                Ft(n, t);
            var a = r.prototype;
            return a.focusEditor = function () {
                var e = this;
                setTimeout((function () {
                    e.props.focusEditor()
                }
                ), 50)
            }
                ,
                a.unwrapLink = function () {
                    var e = this.props.editorState
                        , n = mt(e);
                    if (null != n) {
                        var t = n.blockKey
                            , r = n.startOffset
                            , o = n.endOffset;
                        this.props.onChange(function (e, n, t, r) {
                            var o = e.getCurrentContent()
                                , a = o.getBlockMap()
                                , i = a.get(n)
                                , c = i.getCharacterList().map((function (e, n) {
                                    return n >= t && n < r ? l.CharacterMetadata.applyEntity(e, null) : e
                                }
                                ))
                                , s = i.set("characterList", c)
                                , u = a.set(n, s)
                                , d = o.set("blockMap", u);
                            return l.EditorState.push(e, d, "apply-entity")
                        }(e, t, r, o))
                    }
                }
                ,
                a.render = function () {
                    var e = this.props.isSpellCheckerVisible;
                    return o.a.createElement(jt, null, o.a.createElement(Tt, null, this.renderMarkButton(kt), this.renderMarkButton(wt), this.renderMarkButton(Et), this.renderMarkButton(St), o.a.createElement(Dt, null), this.renderBlockButton(Ct), this.renderBlockButton(xt), o.a.createElement(Dt, null), this.renderLinkButton(), e && o.a.createElement(Dt, null), e && this.renderSpellCheckButton()), o.a.createElement(Pt, null, this.renderAction()))
                }
                ,
                a.renderLinkButton = function () {
                    var e = this.props.editorState.getSelection()
                        , n = this.entityAtCursor()
                        , t = !e.isCollapsed()
                        , r = null != n && n.type === oe.ENTITY_TYPE.LINK
                        , a = t || r
                        , i = r ? o.a.createElement(w.c.UnbindLink, null) : o.a.createElement(w.c.BindLink, null);
                    return o.a.createElement(It, {
                        onClick: this.handleClickLink,
                        isDisabled: !a,
                        isActive: r
                    }, i)
                }
                ,
                a.renderSpellCheckButton = function () {
                    var e = this.props
                        , n = e.onToggleSpellChecker
                        , t = e.isSpellCheckerEnabled
                        , r = t ? C.a.t("builder.resume_editor.spell_checker_disable") : C.a.t("builder.resume_editor.spell_checker_enable");
                    return o.a.createElement(It, {
                        isActive: t,
                        onClick: n
                    }, o.a.createElement(ce.a, {
                        value: r
                    }, this.props.isSpellCheckerPending ? o.a.createElement(Rt, null, o.a.createElement(w.c.SpellCheckPending, null), o.a.createElement(Mt, null, o.a.createElement(Gt, null), o.a.createElement(Ut, null), o.a.createElement(Ht, null))) : o.a.createElement(w.c.SpellCheck, null)))
                }
                ,
                r
        }(r.Component);
        Nt.propTypes = {
            editorState: i.a.object,
            onToggleInline: i.a.func,
            onToggleBlock: i.a.func,
            onChange: i.a.func,
            focusEditor: i.a.func,
            onToggleSpellChecker: i.a.func,
            isSpellCheckerEnabled: i.a.bool,
            suggestionMode: i.a.string,
            suggestionConfig: i.a.object,
            locale: i.a.string,
            mediaQueries: i.a.object.isRequired,
            isSpellCheckerVisible: i.a.bool,
            isSpellCheckerPending: i.a.bool
        },
            Nt.defaultProps = {
                editorState: {},
                suggestionConfig: {},
                onToggleInline: function () { },
                onToggleBlock: function () { },
                onChange: function () { },
                focusEditor: function () { }
            };
        var Yt = Object(ft.b)(Nt)
            , zt = t(74)
            , Jt = t(1131)
            , Vt = t.n(Jt)
            , Qt = t(1647)
            , Xt = t.n(Qt)
            , Zt = t(105)
            , $t = t.n(Zt)
            , er = t(1095)
            , nr = function () {
                var e = Object(r.useContext)(er.b);
                return Object(r.useEffect)((function () {
                    e.init()
                }
                ), []),
                    e
            };
        function tr () {
            return (tr = Object.assign || function (e) {
                for (var n = 1; n < arguments.length; n++) {
                    var t = arguments[n];
                    for (var r in t)
                        Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
                }
                return e
            }
            ).apply(this, arguments)
        }
        var rr = function (e) {
            return function (n) {
                var t = nr()
                    , r = t.spellchecker
                    , a = t.supportedLocales;
                return o.a.createElement(e, tr({
                    supportedLocales: a,
                    spellchecker: r
                }, n))
            }
        };
        function or (e, n) {
            for (var t = 0; t < n.length; t++) {
                var r = n[t];
                r.enumerable = r.enumerable || !1,
                    r.configurable = !0,
                    "value" in r && (r.writable = !0),
                    Object.defineProperty(e, r.key, r)
            }
        }
        function ar (e, n) {
            return (ar = Object.setPrototypeOf || function (e, n) {
                return e.__proto__ = n,
                    e
            }
            )(e, n)
        }
        function ir () {
            return (ir = Object.assign || function (e) {
                for (var n = 1; n < arguments.length; n++) {
                    var t = arguments[n];
                    for (var r in t)
                        Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
                }
                return e
            }
            ).apply(this, arguments)
        }
        var lr, cr = (void 0 === lr && (lr = {}),
        {
            decorators: [y]
        }), sr = function (e) {
            return o.a.createElement(ur, ir({
                ref: e.innerRef
            }, e))
        };
        sr.propTypes = {
            innerRef: i.a.func
        };
        var ur = function (e) {
            var n, t;
            function r (n) {
                var t;
                (t = e.call(this, n) || this).focusEditor = function () {
                    t.editorRef.focus()
                }
                    ,
                    t.handleTab = function (e) {
                        var n = l.RichUtils.onTab(e, t.state.editorState, 1);
                        n !== t.state.editorState && t.handleChange(n)
                    }
                    ,
                    t.handleKeyCommand = function (e, n) {
                        var r = l.RichUtils.handleKeyCommand(n, e);
                        return !!r && (t.handleChange(r),
                            !0)
                    }
                    ,
                    t.handleToggleInline = function (e) {
                        var n = t.state.editorState;
                        t.handleChange(l.RichUtils.toggleInlineStyle(n, e))
                    }
                    ,
                    t.handleToggleBlock = function (e) {
                        var n = t.state.editorState;
                        t.handleChange(l.RichUtils.toggleBlockType(n, e))
                    }
                    ,
                    t.handleToggleSpellChecker = function () {
                        if (!t.state.isSpellCheckerPending) {
                            var e = !t.state.isSpellCheckerEnabled;
                            t.setState({
                                isSpellCheckerEnabled: e
                            }, (function () {
                                t.editorRef.focus()
                            }
                            ))
                        }
                    }
                    ,
                    t.handleChange = function (e) {
                        if (t.props.onChange) {
                            var n = e.getCurrentContent()
                                , r = t.state.editorState.getCurrentContent()
                                , o = n.hasText() ? Object(bt.stateToHTML)(n) : ""
                                , a = r.hasText() ? Object(bt.stateToHTML)(r) : "";
                            t.setState({
                                editorState: e
                            }),
                                a !== o && (t.props.onChange(o),
                                    t.state.isSpellCheckerEnabled && t.handleCheckSpelling(n.getPlainText()))
                        }
                    }
                    ,
                    t.handleFocus = function () {
                        var e = t.state.editorState.getCurrentContent();
                        t.setState({
                            isFocused: !0
                        }, (function () {
                            t.handleCheckSpelling(e.getPlainText())
                        }
                        ))
                    }
                    ,
                    t.handleBlur = function () {
                        t.setState({
                            isFocused: !1
                        })
                    }
                    ,
                    t.handleCheckSpelling = function (e) {
                        t.state.isSpellCheckerEnabled && t.state.isFocused && ($t()(e).length && e !== t.state.checkedText ? t.setState({
                            isSpellCheckerPending: !0
                        }) : t.setState({
                            isSpellCheckerPending: !1
                        }),
                            t.setState({
                                isSpellingChecked: !0
                            }),
                            t.checkSpelling(e))
                    }
                    ,
                    t.checkSpelling = Vt()((function (e) {
                        if ($t()(e).length && e !== t.state.checkedText) {
                            var n = t.props
                                , r = n.locale
                                , o = n.spellchecker;
                            t._requestCounter += 1;
                            var a = t._requestCounter;
                            return o.checkSpelling(e, r).then((function (n) {
                                a === t._requestCounter && t.setState({
                                    incorrectWords: n,
                                    checkedText: e,
                                    isSpellCheckerPending: !1
                                }, t.forceRender)
                            }
                            )).catch((function () {
                                return t.setState({
                                    isSpellCheckerEnabled: !1,
                                    isSpellCheckerPending: !1
                                })
                            }
                            ))
                        }
                        t.setState({
                            isSpellCheckerPending: !1
                        })
                    }
                    ), 600),
                    t.forceRender = function () {
                        var e = t.state.editorState
                            , n = e.getCurrentContent()
                            , r = l.EditorState.createWithContent(n, e.getDecorator())
                            , o = l.EditorState.set(r, {
                                selection: e.getSelection(),
                                undoStack: e.getUndoStack(),
                                redoStack: e.getRedoStack(),
                                lastChangeType: e.getLastChangeType()
                            });
                        t.setState({
                            editorState: o
                        })
                    }
                    ,
                    t.highlightWordsStrategy = function (e, n) {
                        if (t.state.isSpellCheckerEnabled) {
                            var r = t.state.incorrectWords
                                , o = new Set(JSON.parse(localStorage.getItem("SPELL_CHECKER_IGNORED_WORDS")) || []);
                            r.forEach((function (t) {
                                o.has(t.word) || function (e, n, t) {
                                    for (var r, o, a = n.getText(); null !== (r = e.exec(a));) {
                                        var i = (o = r.index) + r[0].length
                                            , l = a.slice(i, i + 1)
                                            , c = 0 === o || /[\s\W]/.test(a.slice(o - 1, o));
                                        ("" === l || /[\W]/.test(l)) && c && t(o, o + r[0].length)
                                    }
                                }(new RegExp(t.word, "g"), e, n)
                            }
                            ))
                        }
                    }
                    ,
                    t.supportsLocale = function (e, n) {
                        return void 0 === n && (n = []),
                            -1 !== (t.props.supportedLocales.length ? t.props.supportedLocales : n).indexOf(e)
                    }
                    ;
                var r = n.value
                    , o = n.label
                    , a = n.locale
                    , i = Object(gt.stateFromHTML)(r)
                    , c = l.EditorState.createWithContent(i);
                return t.state = {
                    editorState: c,
                    checkedText: "",
                    isFocused: !1,
                    label: o,
                    incorrectWords: [],
                    isSpellCheckerEnabled: t.supportsLocale(a),
                    supportedLocales: [],
                    isSpellingChecked: !1,
                    isSpellCheckerPending: !1
                },
                    t._requestCounter = 0,
                    t.spellCheckPlugin = re(t.highlightWordsStrategy),
                    t
            }
            t = e,
                (n = r).prototype = Object.create(t.prototype),
                n.prototype.constructor = n,
                ar(n, t);
            var a, i, c, d = r.prototype;
            return d.componentDidMount = function () {
                this.props.autofocus && this.editorRef.focus()
            }
                ,
                d.componentDidUpdate = function (e, n, t) {
                    var r = this
                        , o = this.props.locale !== e.locale || !Xt()(this.props.supportedLocales, e.supportedLocales);
                    o && this.supportsLocale(this.props.locale) ? this.setState({
                        isSpellCheckerEnabled: !0,
                        isSpellingChecked: !1,
                        checkedText: "",
                        incorrectWords: []
                    }, (function () {
                        var e = r.state.editorState.getCurrentContent();
                        r.handleCheckSpelling(e.getPlainText()),
                            r.forceRender()
                    }
                    )) : o && !this.supportsLocale(this.props.locale) && this.setState({
                        isSpellCheckerEnabled: !1
                    }, this.forceRender)
                }
                ,
                d.shouldHidePlaceholder = function (e) {
                    var n = e.getCurrentContent();
                    return n.hasText() || "unstyled" !== n.getBlockMap().first().getType()
                }
                ,
                d.render = function () {
                    var e = this
                        , n = this.state
                        , t = n.editorState
                        , r = n.label
                        , a = n.incorrectWords
                        , i = n.isSpellCheckerEnabled
                        , l = n.isSpellingChecked
                        , c = n.isSpellCheckerPending
                        , d = this.props
                        , p = d.height
                        , h = d.locale
                        , f = d.suggestionMode
                        , g = d.suggestionConfig
                        , b = this.spellCheckPlugin
                        , m = [cr];
                    return this.isSpellCheckerAvailable && m.push(b),
                        o.a.createElement(u.c, null, o.a.createElement(u.d, null, " ", r, " "), o.a.createElement(u.h, {
                            height: p
                        }, o.a.createElement(Yt, {
                            onChange: this.handleChange,
                            editorState: t,
                            onToggleInline: this.handleToggleInline,
                            onToggleBlock: this.handleToggleBlock,
                            focusEditor: this.focusEditor,
                            onToggleSpellChecker: this.handleToggleSpellChecker,
                            isSpellCheckerEnabled: i,
                            isSpellCheckerVisible: this.isSpellCheckerAvailable && this.supportsLocale(h) && l,
                            isSpellCheckerPending: c,
                            suggestionMode: f,
                            suggestionConfig: g,
                            locale: h
                        }), o.a.createElement(u.b, null, o.a.createElement(s.a, {
                            placeholder: this.shouldHidePlaceholder(t) ? null : this.props.placeholder,
                            editorState: t,
                            onChange: this.handleChange,
                            onFocus: this.handleFocus,
                            onBlur: this.handleBlur,
                            onTab: this.handleTab,
                            handleKeyCommand: this.handleKeyCommand,
                            plugins: m,
                            ref: function (n) {
                                e.editorRef = n
                            }
                        }), o.a.createElement(b.SpellCheckDropdown, {
                            incorrectWords: a
                        }))), o.a.createElement(zt.Transition, {
                            in: this.state.isFocused,
                            timeout: 100
                        }, (function (e) {
                            return o.a.createElement(u.a, {
                                in: e
                            })
                        }
                        )))
                }
                ,
                a = r,
                (i = [{
                    key: "isSpellCheckerAvailable",
                    get: function () {
                        return this.isSpellcheckerSupportedByDevice
                    }
                }, {
                    key: "isSpellcheckerSupportedByDevice",
                    get: function () {
                        var e = this.props.mediaQueries;
                        return !e.isPhone && !e.isTablet
                    }
                }]) && or(a.prototype, i),
                c && or(a, c),
                r
        }(r.Component);
        ur.propTypes = {
            autofocus: i.a.bool,
            onChange: i.a.func,
            label: i.a.string,
            placeholder: i.a.string,
            value: i.a.string,
            height: i.a.number,
            suggestionMode: i.a.string,
            suggestionConfig: i.a.object,
            mediaQueries: i.a.object,
            locale: i.a.string,
            supportedLocales: i.a.array,
            spellchecker: i.a.object
        },
            ur.defaultProps = {
                autofocus: !1,
                onChange: function () { },
                suggestionConfig: {},
                value: "",
                height: 200,
                locale: "en",
                supportedLocales: []
            };
        n.default = rr(Object(ft.b)(sr))
    }
}]);
